import request from "../utils/request";


export const getComment=(websiteId:number|undefined)=>{
    return request({
        method:'get',
        url:`/getComment/${websiteId}`,
    }).then(res=>{
        return res.data
    })
}

export const getCommentByParentId=(id:number)=>{
    return request({
        method:'get',
        url:`/getComment/${id}`,
    }).then(res=>{
        return res.data
    })
}
export const saveComment=(data:object)=>{
    return request({
        method:'POST',
        url:'/saveComment',
        data:data
    }).then(res=>{
        return res.data
    })
}

export const delComment = (id:number) => {
  return request({
      method:'DELETE',
      url:`/delComment/${id}`,
  }).then(res=>{
      return res.data
  })
}